<template>
  <!-- 用户分页功能 -->
  <el-pagination
    @size-change="handleSizeChange"
    @current-change="handleCurrentChange"
    :current-page="queryInfo.pagenum"
    :page-sizes="[10, 5, 3]"
    :page-size="queryInfo.pagesize"
    layout="total, sizes, prev, pager, next, jumper"
    :total="total"
  >
  </el-pagination>
</template>

<script>
export default {
  name: "myPagination",
  props: ["sizeChange", "currentChange", "queryInfo", "total"],
  methods: {
    // 监听展示数量
    handleSizeChange(newSize) {
      this.sizeChange(newSize);
    },
    // 监听页数
    handleCurrentChange(newPage) {
      this.currentChange(newPage);
    },
  },
};
</script>

<style>
</style>